package com.xuhuan.demo.pattern.factory.factorymethod.pizzastore.order;

import com.xuhuan.demo.pattern.factory.factorymethod.pizzastore.pizza.*;

/**
 * @author huan.xu
 * @date 2021/10/4 16:05
 * @description 订购伦敦披萨
 */
public class LDOrderPizza extends OrderPizza {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheese".equals(orderType)) {
            pizza = new LDCheesePizza();
        } else if ("pepper".equals(orderType)) {
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}
